function loadAd(id,typeId){
	$.ajax({
		url:'../../../ad/find/adList',
		type:'get',
		async:false,
		data:{'locationId':typeId,'shopId':_shopId},
		success:function(data){
			var dt = JSON.parse(data);
			if(dt.state==0){
				var htm="<div class='swipe-wrap'>";
				for(var i=0;i<dt.result.data.length;i++){
					var flag= false;
					var index= getHtmlInt(getHeadIndexValue(i, dt, "indexUrl"));
					if(IsEmpty(index)){
						flag=true;
					}
				 htm+="<div  class=\"ad\"><img onclick='toAd("+getHtmlInt(getHeadIndexValue(i, dt, "id"))+","+flag+")' src=\""+getHtmlInt(getHeadIndexValue(i, dt, "imageUrl"))+"\" /><p>"+getHtmlInt(getHeadIndexValue(i, dt, "title"))+"</p></div>";
				}
	             htm+="</div>";
	             $("#"+id).html(htm);
	             setScrollImg();
				}
		}
	});
}

function toAd(id,flag){
	if(flag){
		return false;
	}else{
		var htm="&openId="+_openId+"&shopId="+_shopId;
		window.location.href="adDetails.html?id="+id+htm;
		}
}